//
//  JKRemoteResult.h
//  shopcity
//
//  Created by huangbenhua on 15-4-11.
//  Copyright (c) 2015年 laohuang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JKResponse.h"


@interface JKRemoteResult : NSObject

@property (strong, nonatomic) id tag;
@property (strong, nonatomic) id info;
@property (readonly, nonatomic) JKResponse* response;
@property (readonly, nonatomic) NSDictionary* content;

@property (readonly, nonatomic) BOOL OK;
@property (readonly, nonatomic) BOOL success;
@property (readonly, nonatomic) BOOL failure;

+(id)target:(id)target action:(SEL)action;
+(id)target:(id)target action:(SEL)action tag:(id)tag;
+(id)target:(id)target action:(SEL)action info:(id)info;

-(BOOL)isTail;
-(BOOL)hasMore;

-(JKRemoteResult*)bindTag:(id)tag;
-(JKRemoteResult*)bindInfo:(id)info;

-(void)call:(JKResponse*)response;


-(id)objectForKey:(NSString*)key;
-(id)objectForKey:(NSString*)key nilValue:(id)val;

-(NSDictionary*)dictForKey:(NSString*)key;
-(NSArray*)arrayForKey:(NSString*)key;
-(NSString*)stringForKey:(NSString*)key;
-(NSNumber*)numberForKey:(NSString*)key;

-(NSString*)stringForKey:(NSString*)key nilValue:(NSString*)str;
-(NSNumber*)numberForKey:(NSString*)key nilValue:(NSNumber*)num;


@end
